<?php
/**
 * 博客首页模块 - JBlog
 * 
 * @copyright (c) 2008-2010 JBlog (www.lisijie.org)
 * @author lisijie <lisijie86@gmail.com>
 * @version $Id: index.php 401 2010-05-06 00:31:25Z lisijie86 $
*/

!defined('IN_JBLOG') && exit('Access Denied!');

$page = max(1, intval($get['page']));
$pagesize = config('pagesize');
$offset = ($page - 1) * $pagesize;
$count = $db->count('post', "`type` = 'blog' AND `status` = '1'");
$url = 'mod=index';

query_post('blog', $offset, $pagesize);

blog('title', config('blogexplain'));
blog('keywords', config('keywords'));
blog('description', config('description'));

if ( is_file(THEME_ROOT.'index.php') ) {
	template('index');
} else {
	template('list');
}
?>